package com.ming_za.odupdaterserver.core.vo.resp;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ming_za.odupdaterserver.core.advice.DatetimeSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Schema(defaultValue = "版本信息")
@Data
public class VersionInfoResp {

    @Schema(defaultValue = "版本号")
    private Integer version;

    @Schema(defaultValue = "创建时间")
    @JsonSerialize(using = DatetimeSerializer.class)
    private Date time;

    @Schema(defaultValue = "是否已发布")
    private boolean published;

    public VersionInfoResp(Integer version, Date time, boolean published) {
        this.version = version;
        this.time = time;
        this.published = published;
    }
}
